WOLF core
WOLF: A Modular Estimation Framework for Robotics
XXXXXXXXXXXXXXXXXXXXXXXXvoid(0)" frameborder="0" name="MSearchResults" id="MSearchResults">
wolf::FrameBase Class Reference

#include <core/frame/frame_base.h>

Inheritance diagram for wolf::FrameBase:
[legend]

Public Member Functions

 FrameBase (const TimeStamp &_ts, const TypeComposite &_frame_types, const VectorComposite &_frame_vectors, const PriorComposite &_frame_priors={})
 Constructor time stamp and specs composite. More...
 
 ~FrameBase () override=default
 
void link (TrajectoryBasePtr)
 
void link (ProblemPtr _prb)
 
void remove (bool viral_remove_parent_without_children=false) override
 
bool hasChildren () const override
 
unsigned int id () const override
 
void setTimeStamp (const TimeStamp &_ts)
 
TimeStamp getTimeStamp () const
 
void getTimeStamp (TimeStamp &_ts) const
 
StateBlockConstPtr getV () const
 
StateBlockPtr getV ()
 
TrajectoryBaseConstPtr getTrajectory () const
 
TrajectoryBasePtr getTrajectory ()
 
FrameBaseConstPtr getPreviousFrame (const unsigned int &i=1) const
 
FrameBaseConstPtr getNextFrame (const unsigned int &i=1) const
 
FrameBasePtr getPreviousFrame (const unsigned int &i=1)
 
FrameBasePtr getNextFrame (const unsigned int &i=1)
 
CaptureBaseConstPtrList getCaptureList () const
 
CaptureBasePtrList getCaptureList ()
 
bool hasCapture (const CaptureBaseConstPtr &_capture) const
 
FactorBaseConstPtrList getFactorList () const
 
FactorBasePtrList getFactorList ()
 
void getFactorList (FactorBaseConstPtrList &_fac_list) const
 
void getFactorList (FactorBasePtrList &_fac_list)
 
template<class C >
std::shared_ptr< const C > getCaptureOfType () const
 
template<class C >
std::shared_ptr< C > getCaptureOfType ()
 
CaptureBaseConstPtr getCaptureOfType (const std::string &type) const
 
CaptureBasePtr getCaptureOfType (const std::string &type)
 
template<class C >
std::list< std::shared_ptr< const C > > getCapturesOfType () const
 
template<class C >
std::list< std::shared_ptr< C > > getCapturesOfType ()
 
CaptureBaseConstPtrList getCapturesOfType (const std::string &type) const
 
CaptureBasePtrList getCapturesOfType (const std::string &type)
 
CaptureBaseConstPtr getCaptureOf (SensorBaseConstPtr _sensor_ptr) const
 
CaptureBasePtr getCaptureOf (SensorBaseConstPtr _sensor_ptr)
 
CaptureBaseConstPtr getCaptureOf (SensorBaseConstPtr _sensor_ptr, const std::string &type) const
 
CaptureBasePtr getCaptureOf (SensorBasePtr _sensor_ptr, const std::string &type)
 
CaptureBaseConstPtrList getCapturesOf (SensorBaseConstPtr _sensor_ptr) const
 
CaptureBasePtrList getCapturesOf (SensorBasePtr _sensor_ptr)
 
virtual void printHeader (int depth, bool factored_by, bool metric, bool state_blocks, std::ostream &stream, std::string _tabs="") const
 
void print (int depth, bool factored_by, bool metric, bool state_blocks, std::ostream &stream=std::cout, std::string _tabs="") const
 
virtual CheckLog localCheck (bool _verbose, std::ostream &_stream, std::string _tabs="") const
 
bool check (CheckLog &_log, bool _verbose, std::ostream &_stream, std::string _tabs="") const
 
FrameBasePtr shared_from_this_frame ()
 
FrameBaseConstPtr shared_from_this_frame () const
 
- Public Member Functions inherited from wolf::NodeStateBlocks
 NodeStateBlocks (const std::string &_category, const std::string &_type, const TypeComposite &_state_types, const VectorComposite &_state_vectors, const PriorComposite &_state_priors)
 Constructor. More...
 
virtual ~NodeStateBlocks ()
 
virtual YAML::Node toYaml () const
 
StateKeys getKeys () const
 
TypeComposite getStateTypes () const
 
bool has (const char &_sb_key) const
 
bool has (const std::string &_keys) const
 
virtual unsigned int id () const =0
 
std::map< char, StateBlockConstPtr > getStateBlockMap () const
 
std::map< char, StateBlockPtr > getStateBlockMap ()
 
std::vector< StateBlockConstPtr > getStateBlockVec () const
 
std::vector< StateBlockPtr > getStateBlockVec ()
 
StateBlockConstPtr getP () const
 
StateBlockConstPtr getO () const
 
StateBlockPtr getP ()
 
StateBlockPtr getO ()
 
virtual void fix ()
 
virtual void unfix ()
 
virtual bool isFixed () const
 
StateBlockPtr emplaceStateBlock (const char key, const std::string &_type, const Eigen::VectorXd &_vector, const bool &_fixed)
 Emplace a state block. More...
 
StateBlockPtr emplaceStateBlockZero (const char key, const std::string &_type, const bool &_fixed)
 Emplace a state block with zero state. More...
 
bool hasStateBlock (const StateBlockConstPtr &_sb) const
 
bool setStateBlock (const char _sb_key, const StateBlockPtr &_sb)
 
bool stateBlockKey (const StateBlockConstPtr &_sb, char &_key) const
 
virtual StateBlockConstPtr getStateBlock (const char &_sb_key) const
 
virtual StateBlockPtr getStateBlock (const char &_sb_key)
 
void setProblem (ProblemPtr _problem) override
 
virtual void remove (bool viral_remove_parent_without_children=false)
 
bool hasChildren () const override
 
void emplaceFactorStateBlock (const char &_key, const Eigen::VectorXd &_x, const Eigen::MatrixXd &_cov, unsigned int _start_idx=0)
 Add an absolute factor to a parameter. More...
 
void emplacePriors ()
 
FactorBaseConstPtrSet getFactoredBySet () const
 
FactorBasePtrSet getFactoredBySet ()
 
void getFactoredBySet (FactorBaseConstPtrSet &_fac_set) const
 
void getFactoredBySet (FactorBasePtrSet &_fac_set)
 
FactorBaseConstPtrSet getSensoryFactorSet () const
 
FactorBasePtrSet getSensoryFactorSet ()
 
std::map< char, FactorBaseConstPtr > getPriorFactorMap () const
 
std::map< char, FactorBasePtr > getPriorFactorMap ()
 
FactorBaseConstPtr getPriorFactor (char) const
 
FactorBasePtr getPriorFactor (char)
 
FactorBaseConstPtrList getFactorsOf (ProcessorBaseConstPtr _processor_ptr, const std::string &type="") const
 
FactorBasePtrList getFactorsOf (ProcessorBasePtr _processor_ptr, const std::string &type="")
 
bool hasFactor (FactorBaseConstPtr _fac) const
 
VectorComposite getState (const StateKeys &_keys="") const
 
void setState (const VectorComposite &_state, const bool _notify=true)
 
void setState (const Eigen::VectorXd &_state, const StateKeys &_keys, const std::list< SizeEigen > &_sizes, const bool _notify=true)
 
void setState (const Eigen::VectorXd &_state, const StateKeys &_keys, const bool _notify=true)
 
void setState (const StateKeys &_keys, const std::list< Eigen::VectorXd > &_vectors, const bool _notify=true)
 
Eigen::VectorXd getStateVector (const StateKeys &_keys) const
 
unsigned int getSize (const StateKeys &_keys="") const
 
unsigned int getLocalSize (const StateKeys &_keys="") const
 
bool getCovariance (const StateKeys &_keys, Eigen::MatrixXd &_cov) const
 
void perturb (double amplitude=0.01)
 perturb all states states with random noise following an uniform distribution in [ -amplitude, amplitude ] More...
 
bool isCapture () const
 
bool isFrame () const
 
bool isLandmark () const
 
bool isSensor () const
 
- Public Member Functions inherited from wolf::NodeBase
 NodeBase (const std::string &_category, const std::string &_type="Undefined", const std::string &_name="")
 
virtual ~NodeBase ()=default
 
unsigned int nodeId () const
 
std::string getCategory () const
 
std::string getType () const
 
std::string getName () const
 
bool isRemoving () const
 
virtual bool hasChildren () const =0
 
void setType (const std::string &_type)
 
void setName (const std::string &_name)
 
ProblemConstPtr getProblem () const
 
ProblemPtr getProblem ()
 

Static Public Member Functions

template<typename classType , typename... T>
static std::shared_ptr< classType > emplace (TrajectoryBasePtr _ptr, T &&... all)
 

Protected Member Functions

void setProblem (ProblemPtr _problem) override final
 
- Protected Member Functions inherited from wolf::NodeStateBlocks
virtual void removeStateBlock (const char &_sb_key)
 
void transform (const VectorComposite &_transformation)
 
void printState (bool _factored_by, bool _metric, bool _state_blocks, std::ostream &_stream, std::string _tabs) const
 
CheckLog localCheck (bool _verbose, std::ostream &_stream, std::string _tabs) const
 
virtual void setProblem (ProblemPtr _prob_ptr)
 

Protected Attributes

unsigned int frame_id_
 
TimeStamp time_stamp_
 frame time stamp More...
 
- Protected Attributes inherited from wolf::NodeBase
ProblemWPtr problem_ptr_
 
unsigned int node_id_
 Node id. It is unique over the whole Wolf Tree. More...
 
std::string node_category_
 Text label identifying the category of node ("SENSOR", "FEATURE", etc) More...
 
std::string node_type_
 Text label identifying the type or subcategory of node ("Pin Hole", "Point 2d", etc) More...
 
std::string node_name_
 
bool is_removing_
 A flag for safely removing nodes from the Wolf tree. See remove(). More...
 

Constructor & Destructor Documentation

◆ FrameBase()

wolf::FrameBase::FrameBase ( const TimeStamp &  _ts,
const TypeComposite &  _frame_types,
const VectorComposite &  _frame_vectors,
const PriorComposite &  _frame_priors = {} 
)

Constructor time stamp and specs composite.

Constructor with time stamp and specs (types, vectors, priors)

Parameters
_tsis the time stamp associated to this frame, provided in seconds
_frame_typesTypeComposite containing the types of the state blocs.
_frame_vectorsVectorComposite containing the vectors of the the state blocs.
_frame_priorsPriorComposite containing the priors of the the state blocs.

◆ ~FrameBase()

wolf::FrameBase::~FrameBase ( )
overridedefault

Member Function Documentation

◆ check()

bool wolf::FrameBase::check ( CheckLog &  _log,
bool  _verbose,
std::ostream &  _stream,
std::string  _tabs = "" 
) const

◆ emplace()

template<typename classType , typename... T>
std::shared_ptr< classType > wolf::FrameBase::emplace ( TrajectoryBasePtr  _ptr,
T &&...  all 
)
static

◆ getCaptureList() [1/2]

CaptureBasePtrList wolf::FrameBase::getCaptureList ( )
inline

◆ getCaptureList() [2/2]

CaptureBaseConstPtrList wolf::FrameBase::getCaptureList ( ) const
inline

◆ getCaptureOf() [1/4]

CaptureBasePtr wolf::FrameBase::getCaptureOf ( SensorBaseConstPtr  _sensor_ptr)

◆ getCaptureOf() [2/4]

CaptureBaseConstPtr wolf::FrameBase::getCaptureOf ( SensorBaseConstPtr  _sensor_ptr) const

◆ getCaptureOf() [3/4]

CaptureBaseConstPtr wolf::FrameBase::getCaptureOf ( SensorBaseConstPtr  _sensor_ptr,
const std::string &  type 
) const

◆ getCaptureOf() [4/4]

CaptureBasePtr wolf::FrameBase::getCaptureOf ( SensorBasePtr  _sensor_ptr,
const std::string &  type 
)

◆ getCaptureOfType() [1/4]

template<class C >
std::shared_ptr< C > wolf::FrameBase::getCaptureOfType
inline

◆ getCaptureOfType() [2/4]

template<class C >
std::shared_ptr< const C > wolf::FrameBase::getCaptureOfType
inline

◆ getCaptureOfType() [3/4]

CaptureBasePtr wolf::FrameBase::getCaptureOfType ( const std::string &  type)

◆ getCaptureOfType() [4/4]

CaptureBaseConstPtr wolf::FrameBase::getCaptureOfType ( const std::string &  type) const

◆ getCapturesOf() [1/2]

CaptureBaseConstPtrList wolf::FrameBase::getCapturesOf ( SensorBaseConstPtr  _sensor_ptr) const

◆ getCapturesOf() [2/2]

CaptureBasePtrList wolf::FrameBase::getCapturesOf ( SensorBasePtr  _sensor_ptr)

◆ getCapturesOfType() [1/4]

template<class C >
std::list< std::shared_ptr< C > > wolf::FrameBase::getCapturesOfType
inline

◆ getCapturesOfType() [2/4]

template<class C >
std::list< std::shared_ptr< const C > > wolf::FrameBase::getCapturesOfType
inline

◆ getCapturesOfType() [3/4]

CaptureBasePtrList wolf::FrameBase::getCapturesOfType ( const std::string &  type)

◆ getCapturesOfType() [4/4]

CaptureBaseConstPtrList wolf::FrameBase::getCapturesOfType ( const std::string &  type) const

◆ getFactorList() [1/4]

FactorBasePtrList wolf::FrameBase::getFactorList ( )

◆ getFactorList() [2/4]

FactorBaseConstPtrList wolf::FrameBase::getFactorList ( ) const

◆ getFactorList() [3/4]

void wolf::FrameBase::getFactorList ( FactorBaseConstPtrList &  _fac_list) const

◆ getFactorList() [4/4]

void wolf::FrameBase::getFactorList ( FactorBasePtrList &  _fac_list)

◆ getNextFrame() [1/2]

FrameBasePtr wolf::FrameBase::getNextFrame ( const unsigned int &  i = 1)

◆ getNextFrame() [2/2]

FrameBaseConstPtr wolf::FrameBase::getNextFrame ( const unsigned int &  i = 1) const

◆ getPreviousFrame() [1/2]

FrameBasePtr wolf::FrameBase::getPreviousFrame ( const unsigned int &  i = 1)

◆ getPreviousFrame() [2/2]

FrameBaseConstPtr wolf::FrameBase::getPreviousFrame ( const unsigned int &  i = 1) const

◆ getTimeStamp() [1/2]

TimeStamp wolf::FrameBase::getTimeStamp ( ) const
inline

◆ getTimeStamp() [2/2]

void wolf::FrameBase::getTimeStamp ( TimeStamp &  _ts) const
inline

◆ getTrajectory() [1/2]

TrajectoryBasePtr wolf::FrameBase::getTrajectory ( )
inline

◆ getTrajectory() [2/2]

TrajectoryBaseConstPtr wolf::FrameBase::getTrajectory ( ) const
inline

◆ getV() [1/2]

StateBlockPtr wolf::FrameBase::getV ( )
inline

◆ getV() [2/2]

StateBlockConstPtr wolf::FrameBase::getV ( ) const
inline

◆ hasCapture()

bool wolf::FrameBase::hasCapture ( const CaptureBaseConstPtr &  _capture) const

◆ hasChildren()

bool wolf::FrameBase::hasChildren ( ) const
overridevirtual

Reimplemented from wolf::NodeStateBlocks.

◆ id()

unsigned int wolf::FrameBase::id ( ) const
inlineoverridevirtual

Implements wolf::NodeStateBlocks.

◆ link() [1/2]

void wolf::FrameBase::link ( ProblemPtr  _prb)

◆ link() [2/2]

void wolf::FrameBase::link ( TrajectoryBasePtr  _trj_ptr)

◆ localCheck()

CheckLog wolf::FrameBase::localCheck ( bool  _verbose,
std::ostream &  _stream,
std::string  _tabs = "" 
) const
virtual

◆ print()

void wolf::FrameBase::print ( int  depth,
bool  factored_by,
bool  metric,
bool  state_blocks,
std::ostream &  stream = std::cout,
std::string  _tabs = "" 
) const

◆ printHeader()

void wolf::FrameBase::printHeader ( int  depth,
bool  factored_by,
bool  metric,
bool  state_blocks,
std::ostream &  stream,
std::string  _tabs = "" 
) const
virtual

◆ remove()

void wolf::FrameBase::remove ( bool  viral_remove_parent_without_children = false)
overridevirtual

Reimplemented from wolf::NodeStateBlocks.

◆ setProblem()

void wolf::FrameBase::setProblem ( ProblemPtr  _problem)
finaloverrideprotectedvirtual

Reimplemented from wolf::NodeStateBlocks.

◆ setTimeStamp()

void wolf::FrameBase::setTimeStamp ( const TimeStamp &  _ts)

◆ shared_from_this_frame() [1/2]

FrameBasePtr wolf::FrameBase::shared_from_this_frame ( )
inline

◆ shared_from_this_frame() [2/2]

FrameBaseConstPtr wolf::FrameBase::shared_from_this_frame ( ) const
inline

Member Data Documentation

◆ frame_id_

unsigned int wolf::FrameBase::frame_id_
protected

◆ time_stamp_

TimeStamp wolf::FrameBase::time_stamp_
protected

frame time stamp


The documentation for this class was generated from the following files: